package com.aaa.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;

/**
 * 
 * @TableName user
 */
public class User implements Serializable {

    /**
     * 
     */
    @TableId( type = IdType.AUTO)
    private Integer uid;

    /**
     * 
     */
    @TableField("u_name")
    private String uName;

    /**
     * 
     */
    private Integer age;

    /**
     * 
     */
    @TableField("u_email")
    private String uEmail;

    /**
     * 
     */
    @TableField("c_id")
    private Integer cId;

    private static final long serialVersionUID = 1L;

    /**
     * 
     */
    public Integer getUid() {
        return uid;
    }

    /**
     * 
     */
    public void setUid(Integer uid) {
        this.uid = uid;
    }

    /**
     * 
     */
    public String getuName() {
        return uName;
    }

    /**
     * 
     */
    public void setuName(String uName) {
        this.uName = uName;
    }

    /**
     * 
     */
    public Integer getAge() {
        return age;
    }

    /**
     * 
     */
    public void setAge(Integer age) {
        this.age = age;
    }

    /**
     * 
     */
    public String getuEmail() {
        return uEmail;
    }

    /**
     * 
     */
    public void setuEmail(String uEmail) {
        this.uEmail = uEmail;
    }

    /**
     * 
     */
    public Integer getcId() {
        return cId;
    }

    /**
     * 
     */
    public void setcId(Integer cId) {
        this.cId = cId;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        User other = (User) that;
        return (this.getUid() == null ? other.getUid() == null : this.getUid().equals(other.getUid()))
            && (this.getuName() == null ? other.getuName() == null : this.getuName().equals(other.getuName()))
            && (this.getAge() == null ? other.getAge() == null : this.getAge().equals(other.getAge()))
            && (this.getuEmail() == null ? other.getuEmail() == null : this.getuEmail().equals(other.getuEmail()))
            && (this.getcId() == null ? other.getcId() == null : this.getcId().equals(other.getcId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getUid() == null) ? 0 : getUid().hashCode());
        result = prime * result + ((getuName() == null) ? 0 : getuName().hashCode());
        result = prime * result + ((getAge() == null) ? 0 : getAge().hashCode());
        result = prime * result + ((getuEmail() == null) ? 0 : getuEmail().hashCode());
        result = prime * result + ((getcId() == null) ? 0 : getcId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", uid=").append(uid);
        sb.append(", uName=").append(uName);
        sb.append(", age=").append(age);
        sb.append(", uEmail=").append(uEmail);
        sb.append(", cId=").append(cId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}